package com.kgc.skProvider.controller;


import com.kgc.basic.util.ResponseMsg;
import com.kgc.collection.remote.SalesAdvanceRefundRemote;
import com.kgc.skProvider.service.SalesAdvanceRefundService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.util.Map;

@Controller
public class SalesAdvanceRefundController implements SalesAdvanceRefundRemote {

    private Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private SalesAdvanceRefundService  salesAdvanceRefundService;

    @Override
    public ResponseMsg selectSalesAdvanceRefundByPage(Map<String, Object> map) {
        logger.info("SalesAdvanceRefundController selectSalesAdvanceRefundByPage params is{} ",map.toString());
        ResponseMsg responseMsg = salesAdvanceRefundService.selectSalesAdvanceRefundByPage(map);
        logger.debug("SalesAdvanceRefundController selectSalesAdvanceRefundByPage responseMsg is{} ",responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg insertSalesAdvanceRefund(Map<String, Object> map) {
        logger.info("SalesAdvanceRefundController insertSalesAdvanceRefund is{} ",map.toString());
        ResponseMsg responseMsg = salesAdvanceRefundService.insertSalesAdvanceRefund(map);
        logger.debug("SalesAdvanceRefundController  insertSalesAdvanceRefund responseMsg is{} ",responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg selectSalesAdvanceRefundByCode(Map<String, Object> map) {
        logger.info("SalesAdvanceRefundController selectSalesAdvanceRefundByCode is{} ",map.toString());
        ResponseMsg responseMsg=salesAdvanceRefundService.selectSalesAdvanceRefundByCode(map);
        logger.debug("SalesAdvanceRefundController selectSalesAdvanceRefundByCode responseMsg is{} ",responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg updateSalesAdvanceRefund(Map<String, Object> map) {
        logger.info("SalesAdvanceRefundController updateSalesAdvanceRefund is{} ",map.toString());
        ResponseMsg responseMsg=salesAdvanceRefundService.updateSalesAdvanceRefund(map);
        logger.debug("SalesAdvanceRefundController updateSalesAdvanceRefund responseMsg is{} ",responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg deleteSalesAdvanceRefund(Map<String, Object> map) {
        logger.info("SalesAdvanceRefundController deleteSalesAdvanceRefund is{} ",map.toString());
        ResponseMsg responseMsg=salesAdvanceRefundService.deleteSalesAdvanceRefund(map);
        logger.debug("SalesAdvanceRefundController deleteSalesAdvanceRefund responseMsg is{} ",responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg checkSalesAdvanceRefund(Map<String, Object> map) {
        logger.info("SalesAdvanceRefundController checkSalesAdvanceRefund is{} ",map.toString());
        ResponseMsg responseMsg=salesAdvanceRefundService.checkSalesAdvanceRefund(map);
        logger.debug("SalesAdvanceRefundController checkSalesAdvanceRefund is{} ",responseMsg);
        return responseMsg;
    }
}
